IWindowViewModel.cs
Language: C#
Last Modified: 2020-06-27 1:58:36 PM UTC
File Size: 1481 bytes
Last Modified: 2020-06-27 1:58:36 PM UTC
File Size: 1481 bytes
http://www.penguinstew.ca/example/MVVMbase/ViewModelBase/IWindowViewModel.cs
using System;
using System.Windows;
namespace Penguin.MVVMBase.ViewModelBase
{
/// <summary>
/// Interface used by the basic window viewModels to allow view creation requests back to their related views
/// </summary>
public interface IWindowViewModel
{
#region Events
/// <summary>
/// Event raised to indicate implementing viewModel is requesting a view
/// </summary>
event EventHandler<RequestViewArgs> ViewRequested;
/// <summary>
/// Event raised to indicate implementing viewModel is requesting a message box be shown
/// </summary>
event EventHandler<RequestMsgBoxArgs> MsgBoxRequested;
#endregion
#region Public Methods
/// <summary>
/// Method called when the view is loaded
/// </summary>
/// <param name="sender">The sender object as passed to the loaded event handler</param>
/// <param name="e">RoutedEventArgs as passed to the loaded event handler</param>
void ViewLoaded(object sender, RoutedEventArgs e);
/// <summary>
/// Method called when a requested view has closed
/// </summary>
/// <param name="viewModel">The ViewModel of the closed view</param>
/// <param name="result">Return value of the view</param>
void RequestedViewClosed(IWindowViewModel viewModel, bool result);
#endregion
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43